﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IDAL
{
    public interface IExDelADO<T> where T : class, new()
    {
        /// <summary>
        /// 根据主键id删除一条数据并返回指定字段数据
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="id"></param>
        /// <param name="resStr">传入字段名称返回字段数据</param>
        /// <returns></returns>
        bool Delete(int id, ref string resStr);
        /// <summary>
        /// 根据主键id逻辑删除一条数据(伪删除,需要传递删除标志字段以及相关值和需要同时修改的字段和字段值)
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="id"></param>
        /// <param name="listUpdateField">同步更新的字段及相关值</param>
        /// <param name="resStr">传入字段名称返回字段数据</param>
        /// <returns></returns>
        bool Delete(int id, Dictionary<string, object> listUpdateField, ref string resStr);
        /// <summary>
        /// 根据主键id逻辑删除一条数据(伪删除,需要传递删除标志字段以及相关值和需要同时修改的字段和字段值)
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="id"></param>
        /// <param name="listUpdateField">同步更新的字段及相关值</param>
        /// <param name="m">包含更新字段值的实体类</param>
        /// <param name="resStr">传入字段名称返回字段数据</param>
        /// <returns></returns>
        bool Delete(int id, IList<string> listUpdateField, T m, ref string resStr);
        /// <summary>
        /// 根据自定义条件逻辑删除一条数据(伪删除,需要传递删除标志字段以及相关值和需要同时修改的字段和字段值)
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="strWhere">条件</param>
        /// <param name="paramFields">查询条件参数</param>
        /// <param name="listUpdateField">同步更新的字段及相关值</param>
        /// <param name="resStr">传入字段名称返回字段数据</param>
        /// <returns></returns>
        //bool Delete<T>(string strWhere, Dictionary<string, object> paramFields, Dictionary<string, object> listUpdateField, ref string resStr) where T : class, new();
    }
}
